package org.javascud.extensions.cxf.server;

import org.apache.cxf.endpoint.Server;
import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
import org.javascud.extensions.cxf.service.Hello;


public class HelloServicePublisher
{

    public void start(String address, Hello hello)
    {
        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
        factory.setServiceClass(Hello.class);
        factory.setServiceBean(hello);

        //factory.setAddress("http://localhost:8080/service/HelloWorld");
        factory.setAddress(address);

        Server server = factory.create();
        server.start();
    }
}